package com.originalpoint.origin_server.service;

import com.originalpoint.origin_server.pojo.*;

import java.util.List;

/**
 *用户接口
 */
public interface UserService {

    //订单插入
    public void insertOrders(Orders orders);
    //反查addressId
    public Integer getAddr(Address address);
//    //获取菜品单价
//    public Double getSinglePrice(Integer dishId);
//    //获取菜品剩余数目
//    public Integer getQuantity(Integer dishId);
    //获取菜品信息
    public Dish getDishInfo(Integer dishId);
    //order_dish三字段插入
    public void insertThree(OrderDish orderDish);
    //商家菜品数目同步更新
    public void updateQuantityLeft(Integer quantity,Integer dishId);
    //特定订单查询
    public Integer queryOrderId(String time);
    //order_dish表orderID设置
    public void setodOrderID(Integer id,String time);
    //用户订单集查询
    public List<Orders> queryOrders(Integer userId);

    //查询用户数据
    public User queryUserInfo(Integer userId);

    //插入地址信息
    public void setAddr(Address address);

    //插入地址关联
    public void insertAddr(Integer u_addressId,Integer userId);

    //修改个人信息
    public void updateUserInfo(User user);

//列表渲染
    //商家信息查询
    public List<Merchat> getAllMerchats();
    //商家菜品查询
    public List<Dish> getAllDishes(Integer id);
}
